const mysql = require('mysql')
const con = mysql.createConnection({
    host:'localhost',
    user:'root',
    password:'123456',
    port:'3306',
    database:'blog'
})
con.connect();
con.query(sql,(err,res) =>{
    if(err){
        console.log(err)
    }
    console.log(res)
});
con.end();